Repository navigation
Fix Bearer session access tracking - #28839
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
c88ffed to
974c35b
Compare
974c35b to
2ec5408
Compare
🟡 Playwright Results — all passed (12 flaky)✅ 4272 passed · ❌ 0 failed · 🟡 12 flaky · ⏭️ 88 skipped
🟡 12 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
mohityadav766
left a comment
There was a problem hiding this comment.
needs changes on JwtFilter
…ilter Co-authored-by: Sriharsha Chintalapani <38649+harshach@users.noreply.github.com>
|
Code Review ✅ Approved 2 resolved / 2 findingsUpdates Bearer session validation to include throttled access tracking, resolving unnecessary frequent DB writes and potential authentication failures. Includes comprehensive unit tests to ensure active sessions are correctly preserved. ✅ 2 resolved✅ Performance: recordSessionAccess issues a DB write on every authenticated request
✅ Bug: Access-tracking DB error fails authentication of valid token
OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |



Describe your changes:
Related to #26314
Updates session-bound Bearer-token validation to record successful session access so actively used saved tokens are not evicted as stale by the per-user session cap. The persisted access refresh is throttled to at most once every five minutes per session, while still refreshing when the recorded access is stale or idle expiry is near.
Type of change:
High-level design:
N/A - small bug fix.
Tests:
Use cases covered
Unit tests
JwtFilterTest,SessionServiceTestBackend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
mvn -pl openmetadata-service spotless:applymvn -pl openmetadata-service -Dtest=org.openmetadata.service.security.JwtFilterTest,org.openmetadata.service.security.session.SessionServiceTest testUI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.